home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / dev / obero / Interfaces3_6.lha / compile_all next >
Encoding:
Text File  |  1994-12-12  |  9.9 KB  |  416 lines

  1. ; Installiert die neuen Interfaces und compiliert alles neu
  2. ; Installs the new interfaces and recompiles everything
  3. ;
  4. ; © 1994 by Thomas Wagner [tom];  E-Mail: tom@oak.nbg.sub.org
  5. ;
  6. ; Permission granted to include to Interfaces edited by hartmut Goebel
  7. ; and the Amiga Oberon Distribution.
  8. ;
  9. ; $VER: Compile_All_2 2.1 (12.12.94)
  10. ;
  11. ; KEINE HAFTUNG
  12. ;
  13. ; Die Tabulatorlänge sollte auf 4 gesetzt werden, um diesen Text zu lesen/editieren
  14. ; set tabsize to 4 to read/edit this text
  15.  
  16. ;
  17. ; Die folgenden Angaben muß man an die Distribution anpassen:
  18. ; Adapt the following lines to your distribution
  19. ;
  20.  
  21. ;(set interfaces-format "archive")        ; Interfaces liegen als Archiv vor
  22. ;(set archivename "Interfaces3_6.lha")
  23.  
  24. (set interfaces-format "dir")             ; Interfaces liegen entpackt in einem Directory
  25. (set intdirname "Interfaces")
  26. (set objdirname "obj")
  27.  
  28. ;
  29. ; Strings
  30. ;
  31.  
  32. (if (= @language "deutsch")
  33. (
  34. (if (= interfaces-format "archive")
  35.     (set #start
  36.         (cat "\n© 1994 by Thomas Wagner [tom]\n"
  37.              "*********************************\n\n"
  38.              "Mit diesem Skript kann man die Interfaces Version %ld.%ld Oberon %ld.%ld "
  39.              "installieren und alle System- und Objekt-Files von "
  40.              "Amiga Oberon neu erzeugen.\n\n"
  41.              "Da das Archiv entpackt wird, benötigt es LHA im Suchpfad.\n\n"
  42.              "Wenn der Diskettenname ein '#' enthält, muß die Schublade erst "
  43.              "z.B. ins RAM: kopiert werden, da LHA das nicht verkraftet."
  44.         )
  45.     )
  46.     (set #start
  47.         (cat "\n© 1994 by Thomas Wagner [tom]\n"
  48.              "*********************************\n\n"
  49.              "Mit diesem Skript kann man die Interfaces Version %ld.%ld Oberon %ld.%ld "
  50.              "installieren und alle System- und Objekt-Files von "
  51.              "Amiga Oberon neu erzeugen.\n\n"
  52.         )
  53.     )
  54. )
  55.  
  56. (debug "DIESES SKRIPT NICHT VOM CLI STARTEN, SONST WIRD ES FEHLSCHLAGEN!")
  57.  
  58. (set #copy-interfaces
  59.     (cat "\n\nSoll ich die Interfaces kopieren?\n\n"
  60.         "Wenn sich die Interfaces auf einem read-only Medium "
  61.         "befinden, müssen Sie beim Compilieren sonst viele Requester "
  62.         "'Laufwerk Bla: ist schreibgeschützt'\nabbrechen. "
  63.         "AmigaOberon versucht nämlich, (nicht-existierende) "
  64.         "alte Fehlerdateien zu löschen."
  65.     )
  66. )
  67.  
  68. (set #select-comp
  69.     (cat "Jetzt müssen noch die Symbol- und Objekt-Files erstellt werden. "
  70.          "Bitte wählen Sie, welche Objekt-Files ich erstellen soll."
  71.     )
  72. )
  73.  
  74. (set #compilation
  75.     (cat "Ich compiliere jetzt mit den von Ihnen gewünschten Parametern.\n\n"
  76.          "Bitte haben Sie etwas Geduld. Dieser Teil dauert etwas länger...\n\n"
  77.          "Ich erzeuge gerade die *.obj%s-Files."
  78.     )
  79. )
  80.  
  81. (set #where-to-interfaces "In welches Verzeichnis soll ich die Interfaces entpacken/kopieren?")
  82. (set #where-are-modules "Wo sind die Module?")
  83. (set #where-are-syms
  84.     (cat "In welchem gemeinsamen (Ober-)Verzeichnis befindet sich sowohl "
  85.          "das Verzeichnis \"sym\" also auch \"obj\", bzw. wo sollen diese "
  86.          "angelegt werden?"
  87.     )
  88. )
  89.  
  90. (set #version-warning
  91.     (cat "Warnung:\n\nDie bereits installierte Version ist gleich oder höher "
  92.          "als diese Version.\n\nAlt: %ld.%ld\nNeu: %ld.%ld\n\n"
  93.          "Soll ich wirklich weitermachen?"
  94.     )
  95. )
  96.  
  97. (set #where-is-list "Welche Compilerversion verwenden sie?")
  98.  
  99. (set #comp-old "niedriger als 3.10")
  100. (set #comp-new "3.10 oder höher")
  101.  
  102. (set #where-is-oberon "In welchem Verzeichnis ist der Oberon Compiler?")
  103.  
  104. (set #extracting "Entpacke Daten ...")
  105. (set #copying "Kopiere Interfaces ...")
  106.  
  107. ))
  108.  
  109. (if (= @language "english")
  110. (
  111. (if (= interfaces-format "archive")
  112.     (set #start
  113.         (cat "\n© 1994 by Thomas Wagner [tom]\n"
  114.              "*********************************\n\n"
  115.              "With this script you can install the interfaces version "
  116.              "%ld.%ld Oberon %ld.%ld and recreate all system and objekt files of "
  117.              "Amiga Oberon.\n\n"
  118.              "Thus the archive will be unpacked, it needs LHA in the search path.\n\n"
  119.              "If the volume name contains '#' the drawer must be copied to e.g. "
  120.              "RAM: first, because LHA can't handle this."
  121.         )
  122.     )
  123.     (set #start
  124.         (cat "\n© 1994 by Thomas Wagner [tom]\n"
  125.              "*********************************\n\n"
  126.              "With this script you can install the interfaces version "
  127.              "%ld.%ld Oberon %ld.%ld and recreate all system and objekt files of "
  128.              "Amiga Oberon.\n\n"
  129.         )
  130.     )
  131. )
  132.  
  133. (debug "DO NOT RUN THIS SCRIPT FROM CLI OR IT WILL PROBABLY FAIL!")
  134.  
  135. (set #copy-interfaces
  136.     (cat "\n\nShould I copy the interfaces?\n\n"
  137.         "If the Interface sources are on a read-only media "
  138.         "you else have to cancel a lot requesters\n"
  139.         "'Volume Bla: is write protected' when compiling, "
  140.         "since AmigaOberon tries to delete (non-existent) "
  141.         "old error files."
  142.     )
  143. )
  144.  
  145. (set #select-comp
  146.     (cat "Now the symbol and object files have to be created. "
  147.          "Please select which type of object files should be created."
  148.     )
  149. )
  150.  
  151. (set #compilation
  152.     (cat "I compile with you selected parameters.\n\n"
  153.          "Please be patient. This part will take some time...\n\n"
  154.          "I now create the *.obj%s files."
  155.     )
  156. )
  157.  
  158. (set #where-to-interfaces "Into which dir I should extract/copy the interfaces?")
  159. (set #where-are-modules "Where are the modules?")
  160. (set #where-are-syms
  161.     (cat "In which common (main-)directory are your \"sym\" AND \"obj\" "
  162.          "drawer, or in which directory should they be created?"
  163.     )
  164. )
  165.  
  166. (set #version-warning
  167.     (cat "Warning:\n\nYour installed version ist equal or higher "
  168.          "than this version.\n\nold: %ld.%ld\nnew: %ld.%ld\n\n"
  169.          "Should I really proceed?"
  170.     )
  171. )
  172.  
  173. (set #where-is-list "Which compiler version do you use?")
  174.  
  175. (set #comp-old "lower than 3.10")
  176. (set #comp-new "3.10 or higher")
  177.  
  178. (set #where-is-oberon "In which directory is your compiler?")
  179.  
  180. (set #extracting "Extracting from archive ...")
  181. (set #copying "Copy interfaces ...")
  182.  
  183. ))
  184.  
  185. ;--------------------------------------------------------
  186. ; compile modules and interfaces
  187.  
  188. (set new-vernum (getversion (tackon (pathonly @icon) "interfaces.version")))
  189. (set new-ver (/ new-vernum 65536))
  190. (set new-rev (- new-vernum (* new-ver 65536) ) )
  191.  
  192. (set incl-vernum (getversion (tackon (pathonly @icon) "includes.version")))
  193. (set incl-ver (/ incl-vernum 65536))
  194. (set incl-rev (- incl-vernum (* incl-ver 65536) ) )
  195.  
  196. (message (#start incl-ver incl-rev new-ver new-rev))
  197.  
  198. (welcome)
  199.  
  200. (set @default-dest "OBERON:")
  201.  
  202. (if (exists "oberon:interfaces.version")
  203.     (
  204.         (set old-vernum (getversion "oberon:interfaces.version"))
  205.         (set old-ver (/ old-vernum 65536))
  206.         (set old-rev (- old-vernum (* old-ver 65536) ) )
  207.         (if (>= old-vernum new-vernum)
  208.             (if (NOT (askbool
  209.                     (prompt (#version-warning old-ver old-rev new-ver new-rev))
  210.                     (help @askbool-help)
  211.                     (choices "Proceed" "Abort")
  212.                 ))
  213.                 (exit (quiet))
  214.             )
  215.         )
  216.     )
  217. )
  218.  
  219. (set obfull
  220.     (askdir
  221.         (prompt #where-is-oberon)
  222.         (help @askfile-help)
  223.         (default @default-dest)
  224. ;        (newpath)
  225.     )
  226. )
  227.  
  228. (set comp
  229.     (askoptions
  230.         (prompt #select-comp)
  231.         (help @askoptions-help)
  232.         (choices " <    > (*.obj)"
  233.                  " <-md > (*.objs)"
  234.                  " <-a  > (*.obja)"
  235.                  " <-mda> (*.objsa)"
  236.         )
  237.         (default 15)
  238.     )
  239. )
  240.  
  241. (set obfull (tackon obfull "Oberon"))
  242.  
  243. (set copy-interfaces
  244.     (askbool
  245.         (prompt #copy-interfaces)
  246.         (help @askbool-help)
  247.     )
  248. )
  249.  
  250. (if copy-interfaces
  251.     (set interfaces-dir
  252.         (askdir
  253.             (prompt #where-to-interfaces)
  254.             (help @askdir-help)
  255.             (default (tackon @default-dest "Interfaces"))
  256.         )
  257.     )
  258. )
  259.  
  260. (set modules-dir
  261.     (askdir
  262.         (prompt #where-are-modules)
  263.         (help @askdir-help)
  264.         (default (tackon @default-dest "Module"))
  265.     )
  266. )
  267.  
  268. (set sym-dir
  269.     (askdir
  270.         (prompt #where-are-syms)
  271.         (help @askdir-help)
  272.         (default @default-dest)
  273.     )
  274. )
  275.  
  276. (set list (pathonly @icon))
  277.  
  278. (if
  279.     (askbool
  280.         (prompt #where-is-list)
  281.         (help @askbool-help)
  282.         (choices (#comp-old) (#comp-new))
  283.     )
  284.     (set list (tackon list "recomp.lst"))
  285.     (set list (tackon list "recomp3_10.lst"))
  286. )
  287.  
  288. (if (NOT (exists (tackon sym-dir "sym")))
  289.     (makedir (tackon sym-dir "sym") (infos))
  290. )
  291.  
  292. (if (NOT (exists (tackon sym-dir "obj")))
  293.     (makedir (tackon sym-dir "obj") (infos))
  294. )
  295.  
  296. (onerror (makeassign "objdir") (makeassign "AO_INSTALL_INTERFACES") (makeassign "AO_INSTALL_MODULES"))
  297.  
  298. (makeassign "AO_INSTALL_MODULES" modules-dir)
  299.  
  300. (if copy-interfaces
  301.     (
  302.         (makeassign "AO_INSTALL_INTERFACES" interfaces-dir)
  303.         (makeassign "objdir" (tackon sym-dir "obj"))
  304.     )
  305.     (
  306.         (makeassign "AO_INSTALL_INTERFACES" (tackon (pathonly @icon) intdirname))
  307.         (makeassign "objdir" (tackon (pathonly @icon) objdirname))
  308.     )
  309. )
  310.  
  311. (if (= interfaces-format "archive")
  312.     (
  313.         (working #extracting)
  314.         (run (cat "lha -x0 e " (tackon (pathonly @icon) archivename) " objdir: *.o"))
  315.         (run (cat "lha -x0 e " (tackon (pathonly @icon) archivename) " AO_INSTALL_INTERFACES: *.mod"))
  316.     )
  317.     (if copy-interfaces
  318.     (
  319.             (copyfiles
  320.                 (prompt #copying)
  321.                 (source (tackon (pathonly @icon) intdirname))
  322.                 (dest "AO_INSTALL_INTERFACES:")
  323.                 (optional "askuser")
  324.                 (all)
  325.             )
  326.             (copyfiles
  327.                 (prompt #copying)
  328.                 (source (tackon (pathonly @icon) objdirname))
  329.                 (dest "objdir:")
  330.                 (optional "askuser")
  331.                 (all)
  332.             )
  333.     )
  334.     )
  335. )
  336.  
  337. (makeassign "objdir")
  338.  
  339. (set intro (cat "cd " sym-dir "\nstack 30000\n"))
  340.  
  341. (if (IN comp 0)
  342.     (
  343.         (working (#compilation ""))
  344.         (textfile
  345.             (prompt "")
  346.             (help @textfile-help)
  347.             (dest "T:OBINST")
  348.             (append intro)
  349.             (append (cat obfull " >CON: <" list "\n"))
  350.         )
  351.         (execute "T:OBINST")
  352.         (run "delete T:OBINST")
  353.     )
  354. )
  355.  
  356. (if (IN comp 1)
  357.     (
  358.         (working (#compilation "s"))
  359.         (textfile
  360.             (prompt "")
  361.             (help @textfile-help)
  362.             (dest "T:OBINST")
  363.             (append intro)
  364.             (append (cat obfull " -md >CON: <" list "\n"))
  365.         )
  366.         (execute "T:OBINST")
  367.         (run "delete T:OBINST")
  368.     )
  369. )
  370.  
  371. (if (IN comp 2)
  372.     (
  373.         (working (#compilation "a"))
  374.         (textfile
  375.             (prompt "")
  376.             (help @textfile-help)
  377.             (dest "T:OBINST")
  378.             (append intro)
  379.             (append (cat obfull " -a >CON: <" list "\n"))
  380.         )
  381.         (execute "T:OBINST")
  382.         (run "delete T:OBINST")
  383.     )
  384. )
  385.  
  386. (if (IN comp 3)
  387.     (
  388.         (working (#compilation "sa"))
  389.         (textfile
  390.             (prompt "")
  391.             (help @textfile-help)
  392.             (dest "T:OBINST")
  393.             (append intro)
  394.             (append (cat obfull " -mda >CON: <" list "\n"))
  395.         )
  396.         (execute "T:OBINST")
  397.         (run "delete T:OBINST")
  398.     )
  399. )
  400.  
  401. (copyfiles
  402.     (prompt #copying)
  403.     (source (tackon (pathonly @icon) "interfaces.version"))
  404.     (dest "oberon:")
  405. )
  406.  
  407. (copyfiles
  408.     (prompt #copying)
  409.     (source (tackon (pathonly @icon) "includes.version"))
  410.     (dest "oberon:")
  411. )
  412.  
  413.  
  414. (makeassign "AO_INSTALL_INTERFACES")
  415. (makeassign "AO_INSTALL_MODULES")
  416.